load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_filegroup")

licenses(["notice"])

exports_files_legacy()

# In own group for export to //modules/skunicode/skunicode.gni:skia_unicode_builtin_icu_sources.
skia_filegroup(
    name = "builtin_srcs",
    srcs = ["SkUnicode_icu_builtin.cpp"],
)

# In own group for export to //modules/skunicode/skunicode.gni:skia_unicode_runtime_icu_sources.
skia_filegroup(
    name = "runtime_srcs",
    srcs = ["SkUnicode_icu_runtime.cpp"],
)

# In own group for export to //modules/skunicode/skunicode.gni:skia_unicode_common_icu_sources.
skia_filegroup(
    name = "srcs",
    srcs = [
        "SkUnicode.cpp",
        "SkUnicode_hardcoded.cpp",
        "SkUnicode_hardcoded.h",
    ],
    visibility = ["//modules/skunicode:__pkg__"],
)

skia_filegroup(
    name = "icu_bidi_srcs",
    srcs = [
        "SkUnicode_icu_bidi.cpp",
        "SkUnicode_icu_bidi.h",
    ],
    visibility = ["//modules/skunicode:__pkg__"],
)

skia_filegroup(
    name = "bidi_full_srcs",
    srcs = [
        "SkBidiFactory_icu_full.cpp",
        "SkBidiFactory_icu_full.h",
    ],
    visibility = ["//modules/skunicode:__pkg__"],
)

skia_filegroup(
    name = "bidi_subset_srcs",
    srcs = [
        "SkBidiFactory_icu_subset.cpp",
        "SkBidiFactory_icu_subset.h",
    ],
    visibility = ["//modules/skunicode:__pkg__"],
)

skia_filegroup(
    name = "icu_srcs",
    srcs = [
        "SkUnicode_icu.cpp",
        "SkUnicode_icupriv.h",
        ":builtin_srcs",
        # TODO(kjlubick, bungeman): add support for SkUnicode_icu_runtime.cpp
    ],
    visibility = ["//modules/skunicode:__pkg__"],
)

skia_filegroup(
    name = "client_srcs",
    srcs = [
        "SkUnicode_client.cpp",
    ],
    visibility = ["//modules/skunicode:__pkg__"],
)

skia_filegroup(
    name = "libgrapheme_srcs",
    srcs = [
        "SkUnicode_libgrapheme.cpp",
    ],
    visibility = ["//modules/skunicode:__pkg__"],
)

skia_filegroup(
    name = "icu4x_srcs",
    srcs = [
        "SkUnicode_icu4x.cpp",
    ],
    visibility = ["//modules/skunicode:__pkg__"],
)
